package cn.wolfcode.trip.base.service.impl;

import cn.wolfcode.trip.base.domain.TravelCollect;
import cn.wolfcode.trip.base.mapper.TravelCollectMapper;
import cn.wolfcode.trip.base.service.ITravelCollectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;

@Service
public class TravelCollectServiceImpl implements ITravelCollectService {
   @Autowired
    private TravelCollectMapper travelCollectMapper;

    @Override
    public TravelCollect get(Long userId, Long trevelId) {
        return travelCollectMapper.selectByUserIdAndTreaveId(userId,trevelId);
    }

    @Override
    public void delete(Integer id) {
        travelCollectMapper.deleteByPrimaryKey(id);
    }

    @Override
    public void save(TravelCollect travelCollect) {
        travelCollectMapper.insert(travelCollect);
    }


}
